<?php
$form = $this->beginWidget('CActiveForm', array(
    'id' => 'site-administrator-menu-form',
    'enableAjaxValidation' => false,
    'htmlOptions' => array('enctype' => 'multipart/form-data'),
        ));

if($model->isNewRecord)
{
$parent_menu = site_menu::parentMenu();
}
else
{
$parent_menu = site_menu::parentMenu($model->menu_id);
}

?>
<div class="block">
    
    <?php echo $form->errorSummary($model); ?>
    <div class="input_group">
        <?php echo $form->labelEx($model, 'menu_par_id'); ?>
        <?php echo $form->dropDownList($model, 'menu_par_id', $parent_menu); ?>

    </div>
    <!--
    <?php echo $form->labelEx($model,'menu_location');?>
    <?php echo $form->dropDownList($model,'menu_location', array('user','member','stockist','usersidebar'));?>
    -->
    <?php echo $form->labelEx($model, 'menu_title'); ?>
    <?php echo $form->textField($model, 'menu_title', array('size' => 60, 'maxlength' => 255)); ?>
    
    <?php echo $form->labelEx($model, 'menu_link'); ?>
    <?php echo $form->textField($model, 'menu_link', array('size' => 60, 'maxlength' => 100)); ?>
    
    <button class="button_colour round_all"><img height="24" width="24" alt="Bended Arrow Right" src="<?php echo Yii::app()->params['backendUrl']; ?>/images/icons/small/white/bended_arrow_right.png"><span><?php echo ($model->isNewRecord) ? 'Create' : 'Save'; ?></span></button>

</div>

<?php $this->endWidget(); ?>
<!-- form -->
